package cn.shyouchi.wuguanjia.android.ui.event;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.shyouchi.wuguanjia.android.R;

/**
 * Created by Eenie on 2016/10/25 at 15:27
 * Email: 472279981@qq.com
 * Des:
 */

public class EventManagerAdapter extends BaseQuickAdapter<EventEntity.ResultMessageBean,BaseViewHolder> {
    public EventManagerAdapter(List<EventEntity.ResultMessageBean> data) {
        super(R.layout.item_event_manager_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, final EventEntity.ResultMessageBean event) {
        holder.setText(R.id.tv_event_name, event.getProjectname());
        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                EventCompileActivity.start(mContext, String.valueOf(event.getId()), event.getProjectname());
            }
        });
    }
}
